<template>
  <div
    class='pr'
    style="width:100%;height:100%;"
  >
    <div class="list fsec">
      <div class="item" v-for="(item,index) in list" :key="index">
        <div class="name">{{item.name}}</div>
        <div class="val" :class="item.class">{{moneyFormat(item.val)}}</div>
      </div>
    </div>
  </div>
</template>

<script> 
import RepairViewList from './RepairViewList.vue' 

export default {
  name: "box1",
  props:{
    datas:Array,
    moneyFormat:Function
  },
  components: {
    RepairViewList,
  },
  data() {
    return {
      // flag: 2,
      dialog_visible: false, 
      sub_title:null,
      filters:[],
      list:[
        {name:'盘点总量',val:'45'},
        {name:'账存',val:'45'},
        {name:'实存',val:'45',class:'m_red'},
      ]
    };
  },
  watch: {
    // flag: {
    //   handler: "initCharts",
    //   immediate: true,
    // },
    datas(){
      this.datas.forEach((i,index)=>this.list[index].val=i)
    }
  },
  myChart: null,
  mounted() {
  },
  methods: {
    
  },
};
</script>

<style scoped>
.unit{
  top: 40px;
  left: 16px;
  color: #fff;
  font-size: 12px;
}
</style>